//
//  Order.h
//  ZLShang
//
//  Created by wangguangming on 15/7/28.
//  Copyright © 2015年 Amber. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Order : NSObject
@property(nonatomic,strong)NSString *notes; //订单备注
@property(nonatomic,strong)NSString *oid;//订单号
@property(nonatomic,strong)NSNumber *howToPay;//付款方式
@property(nonatomic,strong)NSMutableArray *items;//商品详情
@property(nonatomic,strong)NSDictionary *consignee;//地址
@property(nonatomic,strong)NSNumber *created;//下单时间
@property(nonatomic,strong)NSNumber *totalCast;//总价格
@property(nonatomic,strong)NSMutableArray *sendTraces;//日志
@property(nonatomic,strong)NSString *orderStatus;
@property(nonatomic,strong)NSString *_id;
@property(nonatomic,strong)NSNumber *traceStatus;//订单状态
@property(nonatomic,strong)NSString *sendDuring;//送货时间段
/*
public static class TraceStatus {
    public static Integer RECEIVED = 0; // 用户签收，配送成功
    public static Integer STORED = 1; // 库存中，未发货
   
    public static Integer SENT = 3; // 第一次配送，发货
    
    public static Integer REJECTED = 5; // 被拒收（客户觉得时间太长不满意退货，货物内容不对）
    public static Integer NOBODY = 6; // 电话不通，人不在
    public static Integer BACKORDER = 7; // 补货
    public static Integer KEEPING = 8; // 二手交换交易时，二手商品已封存
    public static Integer PICKED = 9; // 已配货
    
}
 */

@property (nonatomic, strong) NSNumber *modified;   //修改时间

@property (nonatomic, strong) NSString *buyerId;    // 买家Id
@property (nonatomic, strong) NSString *sellerId;   // 卖家Id

@property (nonatomic, strong) NSNumber *needExch;   // 是否是交换二手商品订单

/*
 值为: online， offline
 */
@property (nonatomic, strong) NSNumber *freight;    // 运费
@property (nonatomic, strong) NSNumber *backPay;    // 返现

    // 订单商品列表
    // 只存储订单商品选择的sku信息列表，SOrderItem  List<SOrderItem>
     //二手交换商品仅含_id, title, picUrl

@property (nonatomic, assign) BOOL hasBill;         //是否开具发票

@property (nonatomic, strong) NSString *cgnId;      // 收货人Id

/* 订单物流信息
 public static Integer RECEIVED = 0; // 用户签收，配送成功
 public static Integer STORED = 1; // 库存中，未发货
 public static Integer SENT = 2; // 第一次配送，发货
 public static Integer RESENT = 3; // 第二次配送，问题件须二次发货
 public static Integer REJECTED = 4; // 被拒收（客户觉得时间太长不满意退货，货物内容不对）
 public static Integer NOBODY = 5; // 电话不通，人不在
 public static Integer ITEM_MISSING = 6; // 少货
 public static Integer ITEM_BROKEN = 7; // 货损（破损，污染）
 public static Integer KEEPING = 8; // 二手交换交易时，二手商品已封存
 public static Integer PICKED = 9; // 已配货
 */
@property (nonatomic, strong) NSArray  *traces;      // 追踪信息 List<ItemTrace>
@property (nonatomic, assign) Boolean  printed;     //  订单是否已经打印
@property (nonatomic, strong) NSArray  *dids;       // 配送事件记录(问题件有两次配送) Delivery ID集合

@property (nonatomic, strong) NSArray  *evidences;   // 二手交换商品取证照片

@property (nonatomic, strong) NSString *pickingman; //  配货人ID
@property (nonatomic, strong) NSNumber *pickTime;   //  配货时间
@property (nonatomic, strong) NSNumber *first;      //  是否是首单

#pragma mark --------- 2015-01-28
@property (nonatomic, strong) NSString *deliveryman;//  送货员Id
@property (nonatomic, strong) NSNumber *sendTime;   //  送货时间

@property (nonatomic, strong) NSNumber *payCost;    // 实付款  -- 2015-03-13
@property (nonatomic, strong) NSNumber *couponSum;  // 优惠券减免+

@property (nonatomic, strong) NSArray  *proms;      // 订单参加的活动列表 List<Promotion> proms;[name,tag,freeSum];

@property (nonatomic, strong) NSArray  *coupons;    // 


@end
